package com.qiyu.tech.tcc.starter.service;

import com.qiyu.tech.tcc.starter.dao.GoodsDao;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author linhao
 * @date created in 4:18 下午 2020/11/4
 */
@Service
public class GoodsService {

    @Resource
    private GoodsDao goodsDao;

    public boolean updateStock(int num,int goodsId){
        int result = goodsDao.updateStockFromFreeze(num,goodsId);
        return result>0;
    }
}
